@extends("home.public.home");

@section("content")
<style>
html,body {
    margin:0;
    height:100%;
}

#insertAdd{
     z-index:4;
}
#zhao{
    width:100% ;
    height:100% ;
    background: red;
    position:absolute;
    z-index:2;
    background-color:#000;
    filter: alpha(opacity=30);
    display:none;
    opacity:0.3;
    margin:0 auto ;
}
</style>
<link rel="stylesheet" type="text/css" href="/style/home/css/home/addr.css">
<script src="/style/home/js/user/addr.js"></script>
<script src="/style/home/js/user/area1.js"></script>
<script src="/style/home/js/user/oldarea.js"></script>
<meta name="csrf-token" content="{{ csrf_token() }}">
<script>


</script>


<div class="layer" id="insertAdd" style="height: 360px; width: 600px; display: none;">
            <input type="hidden" id="deliveridupdate" value="">
            <input type="hidden" id="flag1" value="0">
            <h3 id="h3">增加收货地址</h3>
            <a href="javascript:;" class="layer_close" onclick="hideLayer();">关闭</a>
            <div class="layer_con">
                <ul class="layer_ul">
                    <li class="clearfix">
                        <span class="layer_lefttxt"><i>*</i>收货人：</span>
                        <input type="text" id="name">
                    </li>
                         <li class="clearfix">
                        <span class="layer_lefttxt"><i>*</i>手机号：</span>
                        <input type="text" id="mobile">

                    </li>
                    <li class="clearfix">
                        <span class="layer_lefttxt"><i>*</i>地址：</span>
                        <select id="Province" runat="server" name="province" style="width: 90px" ></select>
                        <select id="Country" runat="server" name="country" style="width: 90px"></select>
                        <select id="Town" runat="server" name="town" style="width: 90px"></select>

                        <script language="javascript">
                        setup();
                        </script>
                    <li class="detail_address clearfix">
                        <span class="layer_lefttxt"><i>*</i>详细地址：</span>
                        <input type="text" id="goodsStreet" maxlength="25">
                    </li>
                                        <li class="clearfix">
                        <span class="layer_lefttxt"><i>&nbsp;</i>邮箱：</span>
                        <input type="text" id="mail">
                    </li>
                    <li class="layer_btn clearfix">
                        <input type="button" id="sub" value="保存收货地址" ">
                    </li>
                </ul>
            </div>
        </div>
<div class="layer" id="insertAdd2" style="height: 360px; width: 600px; display: none;">
            <input type="hidden" id="deliveridupdate" value="">
            <input type="hidden" id="flag1" value="0">
            <h3 id="h3">修改收货地址</h3>
            <a href="javascript:;" class="layer_close" onclick="hideLayer();">关闭</a>
            <div class="layer_con">
                <ul class="layer_ul">
                    <li class="clearfix">
                        <span class="layer_lefttxt"><i>*</i>收货人：</span>
                        <input type="text" class="name2">
                    </li>
                         <li class="clearfix">
                        <span class="layer_lefttxt"><i>*</i>手机号：</span>
                        <input type="text" id="mobile2">

                    </li>
                    <li class="clearfix">
                        <span class="layer_lefttxt"><i>*</i>地址：</span>
                        <select id="Province1"  class="Province2" runat="server" name="province" style="width: 90px" ></select>
                        <select id="Country1" class="Country2" runat="server" name="country" style="width: 90px"></select>
                        <select id="Town1" class="Town2" runat="server" name="town" style="width: 90px"></select>

                        <script language="javascript">
                        setup();
                        </script>
                    <li class="detail_address clearfix">
                        <span class="layer_lefttxt"><i>*</i>详细地址：</span>
                        <input type="text" id="goodsStreet2" maxlength="25">
                    </li>
                                        <li class="clearfix">
                        <span class="layer_lefttxt"><i>&nbsp;</i>邮箱：</span>
                        <input type="text" id="mail2">
                    </li>
                    <li class="layer_btn clearfix">
                        <input type="button" id="sub2" value="保存收货地址" ">
                    </li>
                </ul>
            </div>
        </div>
<div class="user_address" id="outerDiv">
  <h3>我的收货地址</h3>
  <div class="address_con">
    <p class="address_tip">设置好轻松购信息,就可以在商品页面直接下单 ,购物从此变得简单快乐!</p>
    <div class="address_add clearfix">
      <a href="javascript:;" title="新增收货地址" onclick="addrcreate();">新增收货地址</a></div>

    <!-- 页码 -->
    @foreach($data as $k=>$v)
<div class="address_list">
      <div class="address_title">{{$v['sname']}}&nbsp;{{$v['addrInfo']}}{{$v['stel']}}</div>
      <ul class="address_mes">
        <li class="clearfix">
          <span>收货人：</span>
          <em>{{$v['sname']}}</em></li>
        <li class="clearfix">
          <span>所在地区：</span>
          <em>{{$v['addr']}}</em></li>
        <li class="clearfix">
          <span>地址：</span>
          <em>{{$v['addrInfo']}}</em></li>
        <li class="clearfix">
          <span>手机号：</span>
          <em>{{$v['stel']}}</em></li>
        <li class="clearfix">
          <span>邮箱：</span>
          <em>{{$v['email']}}</em></li>
        <li class="clearfix">
          <span>是否默认：</span>
          <em>是</em></li>
      </ul>
      <div class="address_operation clearfix">
        <a href="javascript:;" title="设为默认地址" class="address_default" onclick="pop({{$v['id']}})">设为默认地址</a>
        <a href="javascript:;" title="编辑" class="address_edit" onclick="edit({{$v['id']}})">
          <i class="edit_icon"></i>
          <em>编辑</em></a>
      </div>
      <a href="javascript:;" class="address_del" title="删除" onclick="deleted({{$v['id']}})">删除</a></div>
    @endforeach


    <div class="page_number" id="page_number">
      <ul class="clearfix" style="width: 100%;">
        <li class="page_btn prev disable">
          <a href="javascript:;" title="上一页" class="clearfix" onclick="toPage(0,1,'SH')">
            <i>
            </i>
            <span>上一页</span></a>
        </li>
        <li class="page_num" onclick="toPage(1,1,'SH')">
          <a href="javascript:;" style="color:red">1</a></li>
        <li class="page_btn next">
          <a href="javascript:;" title="下一页" class="clearfix" onclick="toPage(2,1,'SH')">
            <i>
            </i>
            <span>下一页</span></a>
        </li>
        <li class="page_total">共1页</li>
        <li class="page_goto">到第
          <input type="text" value="1" id="pageNum">页</li>
        <li class="page_sure">
          <input type="button" value="确定" onclick="toPage(10000,1,'SH')"></li>
      </ul>
    </div>
  </div>
</div>
@endsection